import { BaseRequest } from "../http"


export const fetchTalkList = ({pageIndex, pageSize}) =>{ // 获取动态列表
  return BaseRequest.get({
    url: `/moment/list`,
    params: {
      pageIndex,
      pageSize
    }
  })
}

export const publishTalk = (data) =>{ // 发布动态
  return BaseRequest.post({
    url: `/moment/add`,
    data
  })
}

export const commentTalk = (data) =>{ // 评论动态
  return BaseRequest.post({
    url: `/moment/comment`,
    data
  })
}

export const fetchCommentList = (data) =>{ // 获取动态详情
  return BaseRequest.post({
    url: `/moment/comment/list`,
    data
  })
}

export const likeComment = (data)=>{
  return BaseRequest.post({
    url: `/moment/like`,
    data
  })
}
export const unlikeComment = (data) => {
  return BaseRequest.post({
    url: `/moment/unlike`,
    data
  })
}
